#include<stdio.h>

int reverse(int number);
int main(void)
{
	int number;
	
	printf("Input number:");
	scanf("%d",&number);
	printf("%d",reverse(number));
	
	return 0;
}
int reverse(int number)
{
	int res,a;
	
	res=0;
	while(number!=0){
	a=number;
	number=number%10;
	res=res*10+number;
	number=a/10;} 
	
	return res;
}

